package com.ocom.human.controller;


import com.ocom.common.constant.HumanServiceUrl;
import com.ocom.common.entity.master.EntityCompanykeyInfo;
import com.ocom.common.enums.ResultEnum;
import com.ocom.common.resp.Result;
import com.ocom.common.utils.ResultUtil;
import com.ocom.human.service.CompanyKeyInfoService;
import com.ocom.redis.aspect.CacheRedisAspect;
import com.ocom.redis.aspect.CleanRedisAspect;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

/**
 * 单位秘钥
 */
@RestController
public class ComKeyInfoController {


    @Autowired
    private CompanyKeyInfoService companyKeyInfoService;

    /**
     *查询单位秘钥信息 wechat/getComKeyInfo
     */
    @GetMapping(HumanServiceUrl.URL_WechatGetComKeyInfo)
    public Result WechatGetComKeyInfo(Long comId){
        if (comId == null){
            return ResultUtil.error(ResultEnum.Err_203);
        }
        return ResultUtil.success(companyKeyInfoService.getComKeyInfo(comId));
    }



}
